package com.automobile.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.automobile.dao.OrderformDao;
import com.automobile.domain.Orderform;
import com.automobile.service.OrderformService;

/**
 * 订单操作，本项目没有用到
 */
@Service("orderformService")
public class OrderformServiceImpl implements OrderformService{
	
	@Autowired
	private OrderformDao orderformDao;
	
	public List<Orderform> findUserOrderforms(int userId) {
		List<Orderform> orderforms = orderformDao.findOrderformByUserId(userId);
		return orderforms;
	}

	public List<Orderform> findMerchantOrderforms(int merchantId) {
		List<Orderform> orderforms = orderformDao.findOrderformByMerchantId(merchantId);
		return orderforms;
	}

	public void save(Orderform orderform) {
		orderformDao.save(orderform);
	}

	public void update(Orderform orderform) {
		orderformDao.update(orderform);
	}

	public void delete(int id) {
		orderformDao.delete(id);
	}

	public Orderform findOrderformById(int orderformId) {
		Orderform orderform = orderformDao.findOrderformById(orderformId);
		return orderform;
	}

}
